3.6.62 \(\int \frac {\sec ^3(c+d x)}{(a+b \tan (c+d x))^2} \, dx\) [562]

3.6.62.1 Optimal result
3.6.62.2 Mathematica [A] (verified)
3.6.62.3 Rubi [A] (warning: unable to verify)
3.6.62.4 Maple [A] (verified)
3.6.62.5 Fricas [B] (verification not implemented)
3.6.62.6 Sympy [F]
3.6.62.7 Maxima [B] (verification not implemented)
3.6.62.8 Giac [A] (verification not implemented)
3.6.62.9 Mupad [B] (verification not implemented)

3.6.62.1 Optimal result

Integrand size = 21, antiderivative size = 91 \[ \int \frac {\sec ^3(c+d x)}{(a+b \tan (c+d x))^2} \, dx=\frac {\text {arctanh}(\sin (c+d x))}{b^2 d}+\frac {a \text {arctanh}\left (\frac {b \cos (c+d x)-a \sin (c+d x)}{\sqrt {a^2+b^2}}\right )}{b^2 \sqrt {a^2+b^2} d}-\frac {\sec (c+d x)}{b d (a+b \tan (c+d x))} \]

output
arctanh(sin(d*x+c))/b^2/d+a*arctanh((b*cos(d*x+c)-a*sin(d*x+c))/(a^2+b^2)^ 
(1/2))/b^2/d/(a^2+b^2)^(1/2)-sec(d*x+c)/b/d/(a+b*tan(d*x+c))
 
3.6.62.2 Mathematica [A] (verified)

Time = 1.35 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.32 \[ \int \frac {\sec ^3(c+d x)}{(a+b \tan (c+d x))^2} \, dx=-\frac {\frac {2 a \text {arctanh}\left (\frac {-b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {b \sec (c+d x)}{a+b \tan (c+d x)}}{b^2 d} \]

input
Integrate[Sec[c + d*x]^3/(a + b*Tan[c + d*x])^2,x]
 
output
-(((2*a*ArcTanh[(-b + a*Tan[(c + d*x)/2])/Sqrt[a^2 + b^2]])/Sqrt[a^2 + b^2 
] + Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - Log[Cos[(c + d*x)/2] + Sin[ 
(c + d*x)/2]] + (b*Sec[c + d*x])/(a + b*Tan[c + d*x]))/(b^2*d))
 
3.6.62.3 Rubi [A] (warning: unable to verify)

Time = 0.33 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.14, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3992, 492, 605, 222, 488, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sec ^3(c+d x)}{(a+b \tan (c+d x))^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sec (c+d x)^3}{(a+b \tan (c+d x))^2}dx\)

\(\Big \downarrow \) 3992

\(\displaystyle \frac {\sec (c+d x) \int \frac {\sqrt {\tan ^2(c+d x)+1}}{(a+b \tan (c+d x))^2}d(b \tan (c+d x))}{b d \sqrt {\sec ^2(c+d x)}}\)

\(\Big \downarrow \) 492

\(\displaystyle \frac {\sec (c+d x) \left (\frac {\int \frac {b \tan (c+d x)}{(a+b \tan (c+d x)) \sqrt {\tan ^2(c+d x)+1}}d(b \tan (c+d x))}{b^2}-\frac {\sqrt {\tan ^2(c+d x)+1}}{a+b \tan (c+d x)}\right )}{b d \sqrt {\sec ^2(c+d x)}}\)

\(\Big \downarrow \) 605

\(\displaystyle \frac {\sec (c+d x) \left (\frac {\int \frac {1}{\sqrt {\tan ^2(c+d x)+1}}d(b \tan (c+d x))-a \int \frac {1}{(a+b \tan (c+d x)) \sqrt {\tan ^2(c+d x)+1}}d(b \tan (c+d x))}{b^2}-\frac {\sqrt {\tan ^2(c+d x)+1}}{a+b \tan (c+d x)}\right )}{b d \sqrt {\sec ^2(c+d x)}}\)

\(\Big \downarrow \) 222

\(\displaystyle \frac {\sec (c+d x) \left (\frac {b \text {arcsinh}(\tan (c+d x))-a \int \frac {1}{(a+b \tan (c+d x)) \sqrt {\tan ^2(c+d x)+1}}d(b \tan (c+d x))}{b^2}-\frac {\sqrt {\tan ^2(c+d x)+1}}{a+b \tan (c+d x)}\right )}{b d \sqrt {\sec ^2(c+d x)}}\)

\(\Big \downarrow \) 488

\(\displaystyle \frac {\sec (c+d x) \left (\frac {a \int \frac {1}{\frac {a^2}{b^2}-b^2 \tan ^2(c+d x)+1}d\frac {1-\frac {a \tan (c+d x)}{b}}{\sqrt {\tan ^2(c+d x)+1}}+b \text {arcsinh}(\tan (c+d x))}{b^2}-\frac {\sqrt {\tan ^2(c+d x)+1}}{a+b \tan (c+d x)}\right )}{b d \sqrt {\sec ^2(c+d x)}}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {\sec (c+d x) \left (\frac {\frac {a b \text {arctanh}\left (\frac {b^2 \tan (c+d x)}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2}}+b \text {arcsinh}(\tan (c+d x))}{b^2}-\frac {\sqrt {\tan ^2(c+d x)+1}}{a+b \tan (c+d x)}\right )}{b d \sqrt {\sec ^2(c+d x)}}\)

input
Int[Sec[c + d*x]^3/(a + b*Tan[c + d*x])^2,x]
 
output
(Sec[c + d*x]*((b*ArcSinh[Tan[c + d*x]] + (a*b*ArcTanh[(b^2*Tan[c + d*x])/ 
Sqrt[a^2 + b^2]])/Sqrt[a^2 + b^2])/b^2 - Sqrt[1 + Tan[c + d*x]^2]/(a + b*T 
an[c + d*x])))/(b*d*Sqrt[Sec[c + d*x]^2])
 

3.6.62.3.1 Defintions of rubi rules used

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 222
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[Rt[b, 2]*(x/Sqrt 
[a])]/Rt[b, 2], x] /; FreeQ[{a, b}, x] && GtQ[a, 0] && PosQ[b]
 

rule 488
Int[1/(((c_) + (d_.)*(x_))*Sqrt[(a_) + (b_.)*(x_)^2]), x_Symbol] :> -Subst[ 
Int[1/(b*c^2 + a*d^2 - x^2), x], x, (a*d - b*c*x)/Sqrt[a + b*x^2]] /; FreeQ 
[{a, b, c, d}, x]
 

rule 492
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ 
(c + d*x)^(n + 1)*((a + b*x^2)^p/(d*(n + 1))), x] - Simp[2*b*(p/(d*(n + 1)) 
)   Int[x*(c + d*x)^(n + 1)*(a + b*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c, 
d, n}, x] && GtQ[p, 0] && (IntegerQ[p] || LtQ[n, -1]) && NeQ[n, -1] &&  !IL 
tQ[n + 2*p + 1, 0] && IntQuadraticQ[a, 0, b, c, d, n, p, x]
 

rule 605
Int[((x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_))/((c_) + (d_.)*(x_)), x_Symbol] 
:> Simp[1/d   Int[x^(m - 1)*(a + b*x^2)^p, x], x] - Simp[c/d   Int[x^(m - 1 
)*((a + b*x^2)^p/(c + d*x)), x], x] /; FreeQ[{a, b, c, d, p}, x] && IGtQ[m, 
 0] && LtQ[-1, p, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3992
Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n 
_), x_Symbol] :> Simp[Sec[e + f*x]/(b*f*Sqrt[Sec[e + f*x]^2])   Subst[Int[( 
a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b 
, e, f, n}, x] && NeQ[a^2 + b^2, 0] && IntegerQ[(m - 1)/2]
 
3.6.62.4 Maple [A] (verified)

Time = 7.86 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.48

method result size
derivativedivides \(\frac {\frac {\frac {2 \left (\frac {b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}+b \right )}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a}-\frac {2 a \,\operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}}{b^{2}}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{2}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{2}}}{d}\) \(135\)
default \(\frac {\frac {\frac {2 \left (\frac {b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}+b \right )}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a}-\frac {2 a \,\operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}}{b^{2}}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{2}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{2}}}{d}\) \(135\)
risch \(-\frac {2 \,{\mathrm e}^{i \left (d x +c \right )}}{d b \left (-i b \,{\mathrm e}^{2 i \left (d x +c \right )}+a \,{\mathrm e}^{2 i \left (d x +c \right )}+i b +a \right )}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a -b}{\sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}\, d \,b^{2}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a -b}{\sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}\, d \,b^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d \,b^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \,b^{2}}\) \(186\)

input
int(sec(d*x+c)^3/(a+b*tan(d*x+c))^2,x,method=_RETURNVERBOSE)
 
output
1/d*(2/b^2*((b^2/a*tan(1/2*d*x+1/2*c)+b)/(tan(1/2*d*x+1/2*c)^2*a-2*b*tan(1 
/2*d*x+1/2*c)-a)-a/(a^2+b^2)^(1/2)*arctanh(1/2*(2*a*tan(1/2*d*x+1/2*c)-2*b 
)/(a^2+b^2)^(1/2)))-1/b^2*ln(tan(1/2*d*x+1/2*c)-1)+1/b^2*ln(tan(1/2*d*x+1/ 
2*c)+1))
 
3.6.62.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 293 vs. \(2 (87) = 174\).

Time = 0.31 (sec) , antiderivative size = 293, normalized size of antiderivative = 3.22 \[ \int \frac {\sec ^3(c+d x)}{(a+b \tan (c+d x))^2} \, dx=-\frac {2 \, a^{2} b + 2 \, b^{3} - {\left (a^{2} \cos \left (d x + c\right ) + a b \sin \left (d x + c\right )\right )} \sqrt {a^{2} + b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2} - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )\right )}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right ) - {\left ({\left (a^{3} + a b^{2}\right )} \cos \left (d x + c\right ) + {\left (a^{2} b + b^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left ({\left (a^{3} + a b^{2}\right )} \cos \left (d x + c\right ) + {\left (a^{2} b + b^{3}\right )} \sin \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, {\left ({\left (a^{3} b^{2} + a b^{4}\right )} d \cos \left (d x + c\right ) + {\left (a^{2} b^{3} + b^{5}\right )} d \sin \left (d x + c\right )\right )}} \]

input
integrate(sec(d*x+c)^3/(a+b*tan(d*x+c))^2,x, algorithm="fricas")
 
output
-1/2*(2*a^2*b + 2*b^3 - (a^2*cos(d*x + c) + a*b*sin(d*x + c))*sqrt(a^2 + b 
^2)*log((2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 - 2* 
a^2 - b^2 - 2*sqrt(a^2 + b^2)*(b*cos(d*x + c) - a*sin(d*x + c)))/(2*a*b*co 
s(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2)) - ((a^3 + a*b 
^2)*cos(d*x + c) + (a^2*b + b^3)*sin(d*x + c))*log(sin(d*x + c) + 1) + ((a 
^3 + a*b^2)*cos(d*x + c) + (a^2*b + b^3)*sin(d*x + c))*log(-sin(d*x + c) + 
 1))/((a^3*b^2 + a*b^4)*d*cos(d*x + c) + (a^2*b^3 + b^5)*d*sin(d*x + c))
 
3.6.62.6 Sympy [F]

\[ \int \frac {\sec ^3(c+d x)}{(a+b \tan (c+d x))^2} \, dx=\int \frac {\sec ^{3}{\left (c + d x \right )}}{\left (a + b \tan {\left (c + d x \right )}\right )^{2}}\, dx \]

input
integrate(sec(d*x+c)**3/(a+b*tan(d*x+c))**2,x)
 
output
Integral(sec(c + d*x)**3/(a + b*tan(c + d*x))**2, x)
 
3.6.62.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 212 vs. \(2 (87) = 174\).

Time = 0.30 (sec) , antiderivative size = 212, normalized size of antiderivative = 2.33 \[ \int \frac {\sec ^3(c+d x)}{(a+b \tan (c+d x))^2} \, dx=-\frac {\frac {2 \, {\left (a + \frac {b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}}{a^{2} b + \frac {2 \, a b^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {a^{2} b \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}} - \frac {a \log \left (\frac {b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} b^{2}} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{b^{2}} + \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{b^{2}}}{d} \]

input
integrate(sec(d*x+c)^3/(a+b*tan(d*x+c))^2,x, algorithm="maxima")
 
output
-(2*(a + b*sin(d*x + c)/(cos(d*x + c) + 1))/(a^2*b + 2*a*b^2*sin(d*x + c)/ 
(cos(d*x + c) + 1) - a^2*b*sin(d*x + c)^2/(cos(d*x + c) + 1)^2) - a*log((b 
 - a*sin(d*x + c)/(cos(d*x + c) + 1) + sqrt(a^2 + b^2))/(b - a*sin(d*x + c 
)/(cos(d*x + c) + 1) - sqrt(a^2 + b^2)))/(sqrt(a^2 + b^2)*b^2) - log(sin(d 
*x + c)/(cos(d*x + c) + 1) + 1)/b^2 + log(sin(d*x + c)/(cos(d*x + c) + 1) 
- 1)/b^2)/d
 
3.6.62.8 Giac [A] (verification not implemented)

Time = 0.48 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.82 \[ \int \frac {\sec ^3(c+d x)}{(a+b \tan (c+d x))^2} \, dx=\frac {\frac {a \log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} b^{2}} + \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{b^{2}} - \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{b^{2}} + \frac {2 \, {\left (b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a\right )}}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a\right )} a b}}{d} \]

input
integrate(sec(d*x+c)^3/(a+b*tan(d*x+c))^2,x, algorithm="giac")
 
output
(a*log(abs(2*a*tan(1/2*d*x + 1/2*c) - 2*b - 2*sqrt(a^2 + b^2))/abs(2*a*tan 
(1/2*d*x + 1/2*c) - 2*b + 2*sqrt(a^2 + b^2)))/(sqrt(a^2 + b^2)*b^2) + log( 
abs(tan(1/2*d*x + 1/2*c) + 1))/b^2 - log(abs(tan(1/2*d*x + 1/2*c) - 1))/b^ 
2 + 2*(b*tan(1/2*d*x + 1/2*c) + a)/((a*tan(1/2*d*x + 1/2*c)^2 - 2*b*tan(1/ 
2*d*x + 1/2*c) - a)*a*b))/d
 
3.6.62.9 Mupad [B] (verification not implemented)

Time = 5.23 (sec) , antiderivative size = 383, normalized size of antiderivative = 4.21 \[ \int \frac {\sec ^3(c+d x)}{(a+b \tan (c+d x))^2} \, dx=-\frac {b^2\,\sin \left (c+d\,x\right )-\frac {2\,\left (a^2\,\cos \left (c+d\,x\right )\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,\sqrt {a^2+b^2}+a^3\,\mathrm {atan}\left (\frac {1{}\mathrm {i}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2+1{}\mathrm {i}\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b+2{}\mathrm {i}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^2}{a\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}+2\,b\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}}\right )\,\cos \left (c+d\,x\right )\,1{}\mathrm {i}\right )}{\sqrt {a^2+b^2}}+\frac {2\,b\,\left (\frac {a\,\sqrt {a^2+b^2}}{2}+\frac {a\,\cos \left (c+d\,x\right )\,\sqrt {a^2+b^2}}{2}-a\,\sin \left (c+d\,x\right )\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,\sqrt {a^2+b^2}-a^2\,\mathrm {atan}\left (\frac {1{}\mathrm {i}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2+1{}\mathrm {i}\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b+2{}\mathrm {i}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^2}{a\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}+2\,b\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^2+b^2}}\right )\,\sin \left (c+d\,x\right )\,1{}\mathrm {i}\right )}{\sqrt {a^2+b^2}}}{a\,b^2\,d\,\left (a\,\cos \left (c+d\,x\right )+b\,\sin \left (c+d\,x\right )\right )} \]

input
int(1/(cos(c + d*x)^3*(a + b*tan(c + d*x))^2),x)
 
output
-(b^2*sin(c + d*x) - (2*(a^3*atan((a^2*sin(c/2 + (d*x)/2)*1i + b^2*sin(c/2 
 + (d*x)/2)*2i + a*b*cos(c/2 + (d*x)/2)*1i)/(a*cos(c/2 + (d*x)/2)*(a^2 + b 
^2)^(1/2) + 2*b*sin(c/2 + (d*x)/2)*(a^2 + b^2)^(1/2)))*cos(c + d*x)*1i + a 
^2*cos(c + d*x)*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*(a^2 + b^2)^( 
1/2)))/(a^2 + b^2)^(1/2) + (2*b*((a*(a^2 + b^2)^(1/2))/2 + (a*cos(c + d*x) 
*(a^2 + b^2)^(1/2))/2 - a^2*atan((a^2*sin(c/2 + (d*x)/2)*1i + b^2*sin(c/2 
+ (d*x)/2)*2i + a*b*cos(c/2 + (d*x)/2)*1i)/(a*cos(c/2 + (d*x)/2)*(a^2 + b^ 
2)^(1/2) + 2*b*sin(c/2 + (d*x)/2)*(a^2 + b^2)^(1/2)))*sin(c + d*x)*1i - a* 
sin(c + d*x)*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))*(a^2 + b^2)^(1/2 
)))/(a^2 + b^2)^(1/2))/(a*b^2*d*(a*cos(c + d*x) + b*sin(c + d*x)))